package bancoperu.util;

import java.text.SimpleDateFormat;
import java.util.Date;

public class Converter {

	public static String utilDateToString(Date date){		
		
		SimpleDateFormat f = new SimpleDateFormat("dd/MM/yyyy");
		
		return f.format(date);
		
	}
	
	public static String sqlDateToString(java.sql.Date date){		
		
		java.util.Date utilDate = new java.util.Date(date.getTime());
		
		return Converter.utilDateToString(utilDate); 
	}
	
	public static java.util.Date sqlDateToUtilDate(java.sql.Date date){		
		
		return new java.util.Date(date.getTime());
	}
	
	public static java.sql.Date utilDateToSqlDate(java.util.Date date){		
		
		return new java.sql.Date(date.getTime());
	}
	
	
}
